import initServerInstance from '../server/initServerInstance';

if (require.main === module) {
	(async () => {
		const server = await initServerInstance({
			loggerConfig: {
				name: 'upgrade',
				alwaysCreate: true,
			},
		});

		for await (const b of server.app.model.Balance.find()) {
			await server.methods.balanceTaskCountUpdate(b.uid);
		}

		process.exit();
	})();
}
